The present invention is concerned with image processing apparatus, and is particularly concerned with the processing of images consisting of scenes involving objects in three dimensions (3D).
In the field of computer graphics, an object surface is commonly represented by means of a series of polygons, most usually triangles. Those triangles can be described in terms of the coordinates of their vertices in 3D space, which can be stored as 3D object data in a memory. The representation of an object surface is computationally inexpensive in the event that the object surface is generally free of detailed relief. In that case, the object surface can be represented by relatively large triangles, which results in relatively little object data being created to describe the triangles. In that way, relatively little memory is required in the computer in order to describe the object surface.
However, if a surface has quite detailed surface relief features, then a large number of very small triangles may be required in order to describe that surface. In that case, the description of the surface can result in the creation of a large amount of object data, the conversion of which into image data can be computationally expensive.
Therefore, in the past, it has been found convenient to describe an object surface in two stages which are briefly described below.
Firstly, the general outline of the object surface is described, using the method described above involving a mesh of triangles. It will be understood that alternative methods of describing an object surface are available, such as by using control points to define a bezier (or other spline) surface, or by providing a mathematical equation of which the surface is a locus.
Secondly, a texture bit map is overlaid over the triangles forming the general outline of the object surface. That texture bit map includes detail which gives the viewer the impression that a relief feature is present, but where the feature is actually described by areas of contrasting colour and shading. The texture bit map may itself be defined over a unit square in a two dimensional space with coordinates (u,v). In the case that a texture bit map is not defined over a unit square, it is possible to map the definition space to that of a unit square. Vertices in the 3D space are given (u,v) coordinates, and the bit map can be clipped to triangles in the mesh by interpolation between the vertices, and finding correspondences between points in the triangles and points in the bit map.
For example, an object consisting of a graphical representation of a metalled road can be described in terms of a series of relatively large triangles, in view of the fact that the object has a generally flat overall surface. However, in order to represent the roughness of the road, or potholes in the road, using triangles, a large number of relatively small triangles would be required. Therefore, it is convenient to illustrate a feature such as a pothole or surface roughness in terms of its appearance, without being concerned with its shape. Accordingly, a texture bit map can be overlaid over the general outline surface of the road (defined by a mesh of large triangles), the texture bit map including a region shaded a darker colour than the rest of the road to represent the appearance of the pothole. The texture bit map could include a xe2x80x9cmottledxe2x80x9d pattern in order to represent the appearance of surface roughness.
That depiction of relief features of an object is reasonably effective when the viewpoint of the object is some distance away from the object. However, it becomes apparent to the viewer how the relief feature has been simulated once the viewpoint becomes much closer to the object. This can lead to deterioration in the overall impression of the quality of the image, and is therefore undesirable.
xe2x80x9cShade Treesxe2x80x9d by Robert L Cook (Computer Graphics Volume 18 Number 3, July 1984, pp 223-231) proposes the use of displacement maps to simulate texture more effectively than texture maps. Displacement maps modify positions of points in the final shading process, whichever process is employed.
A first aspect of the invention provides apparatus and a method which augments a texture bit map with further geometry which allows an object to which the texture bit map is applied to include real 3D geometry corresponding to the texture apparently modelled by the texture bit map.
This contrasts with the method described in the paper by Cook, which merely modifies point positions on a piecemeal basis. The present invention is advantageous because it incorporates the further geometry into the data structure defining the object to be illustrated.
A second aspect of the invention provides computer graphic apparatus comprising means for storing information defining a three dimensional object to be displayed, means for storing information defining a texture to be applied to the object, and means for storing information defining additional three dimensional geometry to be superimposed over the texture in use.
A third aspect of the invention provides means for graphically representing a three dimensional object, including first storage means for storing information defining the underlying shape of said object, and second storage means for storing information defining detailed shape of said object, and means for imposing said information in said second storage means over said information in said first storage means.
In that third aspect, the imposition means may be operative to impose provided that said underlying shape is closer to a nominal viewer than a predetermined threshold.
Preferably, the further geometry includes means for indicating whether or not an individual element of that geometry is to be displayed. In that way, finer control of edges of underlying geometry can be achieved, potentially reducing aliasing.